package com.flower;

import Rule.RandomRuleRuleConfig;
import Rule.RoundRobinRuleConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.cloud.openfeign.EnableFeignClients;

/*
 * @ClassName GoodsApplication
 * @Description goods启动类
 * @Author 吃麻椒的花酱
 * @Date 2021/5/20 16:55
 * @Version 1.0
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@EnableHystrix
@EnableDiscoveryClient
@RibbonClients({
        @RibbonClient(name = "client-order",configuration = RandomRuleRuleConfig.class),
        @RibbonClient(name = "client-user",configuration = RoundRobinRuleConfig.class)
})
public class GoodsApplication {

    public static void main(String[] args) {
        SpringApplication.run(GoodsApplication.class,args);
    }
}
